package com.zyf.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/** 读取配置文件中的    微信扫描支付的配置
 * @author zyf
 * @date 2021年06月02日 17:28
 */
@Component
public class ConstantWXPayPropertiesUtils implements InitializingBean {

    @Value("weixin.pay.appid")
    private String appid;

    @Value("weixin.pay.partner")
    private String partner;  //商户号

    @Value("weixin.pay.partnerkey")
    private String partnerkey; //商户key

    @Value("weixin.pay.cert")
    private String cert; //商户key

    public static String APPID;
    public static String PARTNER;
    public static String PARTNERKEY;
    public static String CERT;


    @Override
    public void afterPropertiesSet() throws Exception {
        APPID = appid;
        PARTNER = partner;
        PARTNERKEY = partnerkey;
        CERT = cert;
    }
}
